from typing import List

nums = [2, 7, 11, 15]
target = 18


def twoSum(nums, target):
    for i in range(len(nums)):
        sub = target - nums[i]
        for j in range(i + 1, len(nums)):
            if nums[j] == sub:
                return [i, j]
    return [-1, -1]


class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        count = len(nums)
        for i in range(count):
            other = target- nums[i]
            for j in range(i+1, count):
                if other· == nums[j]:
                    return [i,j]
# print(twoSum(nums, target))
print(Solution().twoSum(nums, target))